using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Collections.Generic;

using Jamila2.CoreElements;
using Jamila2.Database;

public sealed class GonzalesSystemInformation : SystemInformationBase, ISystemInformation
{
    public static readonly string WebApplicationTitle = "Covidien : EZY Electronic Claim System";

	public GonzalesSystemInformation() 
	{
        this.engine_name = "Kypris2";
        this.creator = "Abeo Viet Name : A member of Abeo International ";
        this.last_updatedby = "Frank Truong";
        this.last_updatedon = DateTime.Parse("07/17/2013");
	}    
}

public sealed class GonzalesGeneralVariables
{
    public static string URL
    {
        get { return ConfigurationManager.AppSettings["Gonzales_URL"]; }
    }

    public static string DatabaseConnectionString
    {
        get { return ConfigurationManager.AppSettings["Gonzales_DBConn"]; }
    }

    public static TypeOfDatabase DatabaseType
    {
        get
        {
            TypeOfDatabase ResultType = TypeOfDatabase.MSSQL;

            switch (ConfigurationManager.AppSettings["Gonzales_DBType"])
            {
                case "MSSQL":
                    ResultType = TypeOfDatabase.MSSQL;
                    break;

                case "ODBC":
                    ResultType = TypeOfDatabase.ODBC;
                    break;

                case "OleDB":
                    ResultType = TypeOfDatabase.OleDB;
                    break;
            }

            return ResultType;
        }
    }

    public static string DefaultLanguage
    {
        get { return ConfigurationManager.AppSettings["Gonzales_DefaultLanguage"]; }
    }

    public static bool GhostMode
    {   // all people kenot login, only Admin
        get { return (ConfigurationManager.AppSettings["Gonzales_GhostMode"].CompareTo("1") == 0); }
    }

    public static bool MaintenanceMode
    {
        get { return (ConfigurationManager.AppSettings["Gonzales_MaintenanceMode"].CompareTo("1") == 0); }
    }

    public static string SMTP
    {
        get { return ConfigurationManager.AppSettings["Gonzales_SMTP"].ToString(); }
    }

    public static string EmailFromName
    {
        get { return ConfigurationManager.AppSettings["Gonzales_EmailFromName"].ToString(); }
    }

    public static string EmailFromAdd
    {
        get { return ConfigurationManager.AppSettings["Gonzales_EmailFromAdd"].ToString(); }
    }

    public static bool EmailActive
    {
        get { return (ConfigurationManager.AppSettings["Gonzales_EmailActive"].ToString().CompareTo("1") == 0); }
    }

    public static string CurrencyFormat
    {
        get { return ConfigurationManager.AppSettings["Gonzales_CurrencyFormat"].ToString(); }
    }

    public static string LDAP
    {
        get { return "LDAP://" + ConfigurationManager.AppSettings["Gonzales_LDAP"].ToString(); }
    }

    public static string AlternateLDAP1
    {
        get { return "LDAP://" + ConfigurationManager.AppSettings["Gonzales_LDAPAlt1"].ToString(); }
    }

    public static string WebsiteName
    {
        get { return ConfigurationManager.AppSettings["Gonzales_WebsiteName"].ToString(); }
    }

    //Added By Agnes[26 March 2009] -- Need to link to EzyTravel database.
    public static string EzyTravelDatabaseConnectionString
    {
        get { return ConfigurationManager.AppSettings["EzyTravel_DBConn"]; }
    }

    public static string ElapsedTime
    {
        get { return ConfigurationManager.AppSettings["Gonzales_ElapsedTime"]; }
    }

    // Added by thangnv 20130730
    public static List<string> CostCenters
    {
        get { return new List<string>(ConfigurationManager.AppSettings["Gonzales_CostCenters"].ToString().Split(';')); }
    }

    public static List<string> SpecialUsers
    {
        get { return new List<string>( ConfigurationManager.AppSettings["Gonzales_SpecialUsers"].ToString().Split(';') ); }
    }

    public static string BuildInCostCenters()
    {
        List<string> costcenters = CostCenters;
        string RetValue = string.Empty;
        foreach (string CostCenter in costcenters)
        {
            if(string.IsNullOrEmpty(RetValue))
                RetValue += "'" + CostCenter + "'";
            else
                RetValue += ", '" + CostCenter + "'";
        }
        return RetValue;
    }

    public static string Special_GLCodeName
    {
        get { return ConfigurationManager.AppSettings["Gonzales_SpecialGLTransport"]; }
    }

}

public sealed class GonzalesCommonNamingConvention
{
    public static readonly string CurrentPrivateSession = "CurrentPrivateSession";
    public static readonly string CurrentPrivateSessionViewState = "CurrentPrivateSessionViewState";
    public static readonly string CurrentRedirectSession = "CurrentRedirectSession";
    public static readonly string CurrentClipBoardSession = "CurrentClipBoardSession";
}

public sealed class GonzalesErrorPageRedirect
{
    public static readonly string SessionError = "SessionErrorPage.aspx";
    public static readonly string FatalError = "";
    public static readonly string PageFlowError = "";

}

public sealed class GonzalesInformationPageRedirect
{
    public static readonly string ServerMaintainance = "GonzalesInfoMaintainance.aspx";
    public static readonly string UpdateRequired = "";   
}

public sealed class GonzalesImages
{
    private static string ImageFolder = "img/";

    public static readonly string Icon_Crossed = ImageFolder + "ico_cross.gif";
    public static readonly string Icon_Detail = ImageFolder + "ico_detail.gif";
    public static readonly string Icon_Checked = ImageFolder + "ico_checked.gif";
    public static readonly string Icon_Flag = ImageFolder + "ico_flag.gif";
    public static readonly string Icon_Remarks = ImageFolder + "ico_remarks.gif";
    public static readonly string Icon_CreditCard = ImageFolder + "ico_mastercard.gif";
    public static readonly string Icon_Expand = ImageFolder + "ico_expand.gif";
    public static readonly string Icon_Personal = ImageFolder + "ico_personal.gif";
    public static readonly string Icon_Warning = ImageFolder + "ico_warning.gif";
    public static readonly string Icon_Warning2 = ImageFolder + "ico_warning2.gif";
    public static readonly string Icon_Delete = ImageFolder + "ico_delete.gif";
    public static readonly string Icon_Approve = ImageFolder + "ico_approve.gif";
}

public sealed class GonzalesUserAction
{
    public static readonly string ClaimCreated = "Claim Created";
    public static readonly string ClaimSaved = "Claim Saved";
    public static readonly string ClaimSubmitted = "Claim Submitted";
    public static readonly string ClaimApproved = "Claim Approved";
    public static readonly string ClaimEscalated = "Claim Escalated";
    public static readonly string ClaimAuthorized = "Claim Authorized";
    public static readonly string ClaimVerified = "Claim Verified";
    public static readonly string ClaimFinanceApproved = "Claim Finance Approved";
    public static readonly string ClaimCancelled = "Claim Cancelled";
    public static readonly string ClaimRejectedByApprover = "Claim Rejected By Approver";
    public static readonly string ClaimRejectedByAuthorizer = "Claim Rejected By Authorizer";
    public static readonly string ClaimRejectedByFinanceAdmin = "Claim Rejected By FinanceAdmin";
    public static readonly string ClaimRejectedByFinanceAapprover = "Claim Rejected By FinanceApprover";
    //added by mei chze on 19072012
    public static readonly string ClaimStatusChange = "Claim Status Change By System Admin";
    //added by thangnv on 20130530 use for change log function
    public static readonly string Added = "Added";
    public static readonly string Modified = "Modified";
    public static readonly string Deleted = "Deleted";
}

public sealed class GonzalesUserRole
{
    public static readonly string FinanceManager = "Finance Manager";
    public static readonly string FinanceAdmin = "Finance Admin";
    public static readonly string PowerAdmin = "Power Admin";
    public static readonly string ITAdmin = "IT Admin";
}

public sealed class EmailTemplate
{
    public static readonly string path = "MultiLanguage\\MailContent\\";

    public static readonly string ClaimSubmitted = "ClaimSubmit";
    public static readonly string ClaimApproved = "ClaimApproved";
    public static readonly string ClaimPendingAuthorize = "ClaimPendingForAuthorizer";
    public static readonly string ClaimVerified = "ClaimVerifiedForClaimant";
    public static readonly string ClaimEscalated = "ClaimEscalated";
    public static readonly string ClaimRejected = "ClaimReject";
    public static readonly string ClaimRejectedNotifyApprover = "ClaimRejectNotifyApprover";
 
}

public sealed class ActionRedirect
{
    public static readonly string SUBMITTED_CLAIM = "SUBMITTEDCLAIM";
    public static readonly string APPROVED_CLAIM = "APPROVEDCLAIM";
    public static readonly string PENDINGAUTH_CLAIM = "PENDINGAUTHCLAIM";
    public static readonly string VERIFIED_CLAIM = "VERIFIEDCLAIM";
    public static readonly string ESCALATED_CLAIM = "ESCALATEDCLAIM";
    public static readonly string REJECTED_CLAIM = "REJECTEDCLAIM";
    public static readonly string REJECTEDNOTIFYAPPR_CLAIM = "REJECTEDNOTIFYAPPRCLAIM";
}


